﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Reddit.Data
{
    [CollectionDataContract]
    public class StoryStoriesResult : DataContainerCollection
    {

        public override Type[] Types
        {
            get
            {
                return new Type[] { typeof(StoryCollection), typeof(StoryCollection) };
            }
        }

        public DataContainer<Story> MainStory
        {
            get 
            { 
                return (DataContainers[0] as StoryCollection).FirstOrDefault();
            }
        }
        public StoryCollection ChildStories
        {
            get { return DataContainers[1] as StoryCollection; }
        }
    }
}
